﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model.Request;
using Model.Response;
using Common;
using System.Data;
using Dapper;
namespace Dal
{
    public class AddressBookDAL
    {
        /// <summary>
        /// 通讯录列表
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public List<ResAddressBook> AppAddressListShow(AddressBookRequest model)
        {
            var dp = new DynamicParameters();
            dp.Add("@UserCode", model.UserCode);
            dp.Add("@CoID", model.CoID);
            dp.Add("@PaperIndex", model.PaperIndex);
            using (IDbConnection conn = daconn.GetConnection())
            {
                var abs = conn.Query<ResAddressBook>("prAppAddressListShow", dp, null, true, null, CommandType.StoredProcedure).ToList();
                return abs;
            }
        }
    }
}
